package app.netant.book.biduju;

import cn.lily.com.enviroment.Enviroment;
import app.netant.book.base.BaseDetail;
import app.netant.book.base.BaseEntity;
import app.netant.book.base.BasePage;
import app.netant.book.base.BaseRoot;

public class BidujuRoot extends BaseRoot {
	
	public BidujuRoot(){
		this.homeUrl = "https://www.biduju.com/xuanhuan/1.html";
		this.pageUrl = "https://www.biduju.com/xuanhuan/";
		this.tableKey = "biduju";
	}

	@Override
	public String buildUrl(int pageIdx) {
		return this.pageUrl + pageIdx+".html";
	}

	@Override
	public BasePage buildPage(String url) {
		return new BidujuPage(url);
	}

	@Override
	public BaseDetail buildDetail(String url) {
		return new BidujuDetail(url);
	}

	@Override
	public BaseEntity buildEntity() {
		return new BidujuEntity();
	}
	
	@Override
	public void afterEntity(BaseEntity entity) {
		
	}
	
	public static void main(String[] args) {
		
		Enviroment.createEnv();
		Enviroment.getEnv().getLogBean().beginLog();
		
		BidujuRoot root = new BidujuRoot();
		root.analyse(1025);
		//root.excepCycle();
	}


	
}
